<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算机二级(MS Office)考试网</title>
    <style>
              .navbar {
            background: #2A3F6B;
            padding: 1rem;
            color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        /* 学习资料板块整体样式 */
.learning-materials {
  padding: 40px 20px;
  background: #f8f9fa;
}

/* 分类导航样式 */
.material-nav {
  max-width: 1200px;
  margin: 0 auto 30px;
}

.material-nav h2 {
  color: #2A3F6B;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 20px;
}

.nav-tags {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.tag {
  background: #e9ecef;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Noto Sans SC', sans-serif;
}

.tag.active {
  background: #4A90E2;
  color: white;
}

/* 资料卡片网格布局 */
.material-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

/* 单个卡片样式 */
.material-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.material-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-header i {
  font-size: 28px;
  color: #2A3F6B;
}

.format-tag {
  background: #4A90E2;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
}

.material-card h3 {
  color: #333;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 10px;
}

.material-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  min-height: 60px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  color: #999;
  font-size: 12px;
}

/* 按钮样式 */
.study-btn, .download-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background 0.3s;
}

.study-btn {
  background: #4CAF50;
  color: white;
}

.download-btn {
  background: #FF6B6B;
  color: white;
}

.study-btn:hover {
  background: #45a049;
}

.download-btn:hover {
  background: #e65a5a;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .material-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-tags {
    gap: 10px;
  }
  
  .tag {
    padding: 6px 15px;
  }
}
    </style>
</head>
<body>
  <nav class="navbar">
    <h1>计算机二级(MS Office)考试网</h1>
</nav>
    <!-- 学习资料板块容器 -->
<section class="learning-materials">
    <!-- 分类导航 -->
    <div class="material-nav">
      <h2>📚 MS Office学习资料库</h2>
      <div class="nav-tags">
        <button class="tag active" data-category="all">全部</button>
        <button class="tag" data-category="video">视频课程</button>
        <button class="tag" data-category="pdf">PDF教材</button>
        <button class="tag" data-category="exam">历年真题</button>
        <button class="tag" data-category="tools">效率工具</button>
      </div>
    </div>
  
    <!-- 资料卡片容器 -->
    <div class="material-grid">
      <!-- 单个资料卡片 -->
      <div class="material-card" data-category="video">
        <div class="card-header">
          <i class="fas fa-video"></i>
          <span class="format-tag">高清视频</span>
        </div>
        <h3>Word排版大师课</h3>
        <p>从零掌握长文档排版技巧，包含目录生成、样式应用等核心考点</p>
        <div class="card-meta">
          <span><i class="fas fa-download"></i> 2.3万次下载</span>
          <span><i class="fas fa-clock"></i> 6.5小时</span>
        </div>
        <button onclick="fn()" class="study-btn"><i class="fas fa-play"></i> 立即学习</button>
        <script>
          function fn(){
            window.location.href = `../data/video02.html`;
          }
        </script>
      </div>
  
      <!-- 更多卡片示例 -->
      <div class="material-card" data-category="pdf">
        <div class="card-header">
          <i class="fas fa-file-pdf"></i>
          <span class="format-tag">PDF文档</span>
        </div>
        <h3>Excel函数宝典</h3>
        <p>涵盖VLOOKUP、SUMIF等32个核心函数详解与实战案例</p>
        <div class="card-meta">
          <span><i class="fas fa-download"></i> 1.8万次下载</span>
          <span><i class="fas fa-file-alt"></i> 58页</span>
        </div>
        <button class="download-btn"><i class="fas fa-download"></i> 下载文档</button>
      </div>
    </div>
  </section>
  <script>
    // 分类筛选功能示例
document.querySelectorAll('.tag').forEach(tag => {
  tag.addEventListener('click', () => {
    // 移除所有激活状态
    document.querySelectorAll('.tag').forEach(t => t.classList.remove('active'));
    // 添加当前激活状态
    tag.classList.add('active');
    // 获取分类参数
    const category = tag.dataset.category;
    // 筛选卡片
    document.querySelectorAll('.material-card').forEach(card => {
      card.style.display = (category === 'all' || card.dataset.category === category) 
        ? 'block' 
        : 'none';
    });
  });
});
  </script>
    
</body>
</html>